package com.infotel.prefecture.dao;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import com.infotel.prefecture.exception.PrefectureException;
import com.infotel.prefecture.model.CarteGrise;
import com.infotel.prefecture.model.Etat;
import com.infotel.prefecture.model.Modele;
import com.infotel.prefecture.model.Particulier;
import com.infotel.prefecture.model.Proprietaire;
import com.infotel.prefecture.model.Vehicule;

public class Test {

    public static void main(String[] args) throws PrefectureException, ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Proprietaire particulierTest;
        Vehicule vehiculeTest;

        particulierTest = new Particulier(1, "10 rue des cerisiers", "plop",
                "plip");
        vehiculeTest = new Vehicule("137566gdf", new Modele(8), 5, 2500,
        sdf.parse("2013-01-01"), 25, 70);

        ProprietaireDAO pdao = new ProprietaireDAOJdbc();
        pdao.insertProprietaire(particulierTest);
        
        CarteGrise carteGriseTest = new CarteGrise("ab-563-fg", Etat.CD, vehiculeTest, particulierTest, 7);
        CarteGriseDAO cdao = new CarteGriseDAOJdbc();
        
        //cdao.insertCarteGrise(carteGriseTest);
        
        

    }

}
